<template>
    <div>
        <div class="header">
            <div class="top">
                <div class="add">
                    <h1>成都</h1>
                </div>
                <div class="search">
                    <i class="iconfont icon-search"></i>
                    <input type="text" placeholder="眼部修护精华原液">
                </div>
                <div class="scan">
                    <i></i>
                    <p>扫一扫</p>
                </div>
                <div class="info">
                    <i></i>
                    <p>消息</p>
                </div>
            </div>
            <my-swiper></my-swiper>
            <ul class="nav">
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 1 }}">
                        <img src="../image/home_nav1.png" alt="nav.jpg">
                        <p>精油原液</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 2 }}">
                        <img src="../image/home_nav2.png" alt="nav.jpg">
                        <p>植物精油</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 3 }}">
                        <img src="../image/home_nav3.png" alt="nav.jpg">
                        <p>旺斯指纹</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 4 }}">
                        <img src="../image/home_nav4.png" alt="nav.jpg">
                        <p>海洋之心</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 5 }}">
                        <img src="../image/home_nav5.png" alt="nav.jpg">
                        <p>埃及之诺</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 6 }}">
                        <img src="../image/home_nav6.png" alt="nav.jpg">
                        <p>冰霜面膜</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 7 }}">
                        <img src="../image/home_nav7.png" alt="nav.jpg">
                        <p>丝滑雪肤</p>
                    </router-link>
                </li>
                <li>
                    <router-link :to="{ path: 'proCate', query: { id: 8 }}">
                        <img src="../image/home_nav8.png" alt="nav.jpg">
                        <p>精油手霜</p>
                    </router-link>
                </li>
            </ul>
        </div>
        <div class="main">
            <div class="brand">
                <div>
                    <h4>品牌</h4>
                    <i>新闻</i>
                    <b>捐书筑梦‖透过字里行间的温度—“22厘米希望”</b>
                </div>
                <div>
                    <h4>动态</h4>
                    <i>热文</i>
                    <b>诺曼姿小V老师：春季修护皮肤干裂，怎能少了她？</b>
                </div>
            </div>
            <div class="section">
                <router-link to="proCate"><span></span></router-link>
                <ul class="cheng">
                    <li>
                      <router-link to="pro_details">
                        <img src="../image/home_chengdu.jpg" alt="chengdu.jpg">
                      </router-link>
                    </li>
                    <li>
                      <router-link to="pro_details">
                        <img src="../image/home_chengdu2.jpg" alt="chengdu.jpg">
                      </router-link>
                    </li>
                    <li>
                      <router-link to="pro_details">
                        <img src="../image/home_chengdu3.jpg" alt="chengdu.jpg">
                       </router-link>
                    </li>
                    <li>
                      <router-link to="pro_details">
                        <img src="../image/home_chengdu4.jpg" alt="chengdu.jpg">
                       </router-link>
                    </li>
                </ul>
            </div>
            <div class="section">
                <router-link to="proCate"><span></span></router-link>
                <router-link to="proCate"><h3>量贩优选</h3></router-link>
                <ul>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_preference.jpg" alt="home_preference.jpg">
                        </router-link>
                    </li>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_preference2.jpg" alt="home_preference.jpg">
                        </router-link>
                    </li>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_preference3.jpg" alt="home_preference.jpg">
                        </router-link>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_preference4.jpg" alt="home_preference.jpg">
                        </router-link>
                    </li>
                </ul>
            </div>
             <div class="section">
                <router-link to="proCate"><span></span></router-link>
                <router-link to="proCate"><h4>天天特价</h4></router-link>
                <ul>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_ bargain_price1.jpg" alt="home_ bargain_price1.jpg">
                        </router-link>
                    </li>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_ bargain_price2.jpg" alt="home_ bargain_price1.jpg">
                        </router-link>
                    </li>
                    <li>
                        <router-link to="pro_details">
                          <img src="../image/home_ bargain_price3.jpg" alt="home_ bargain_price1.jpg">
                        </router-link>
                    </li>
                    <li>
                        <img src="../image/home_ bargain_price4.jpg" alt="home_ bargain_price1.jpg">
                    </li>
                </ul>
            </div>
        </div>
        <Footer></Footer>
    </div>
</template>

<script>
import Footer from "../template/footer";
import MySwiper from "../template/mySwiper";
export default {
  name: "homeComponent",
  components: {
    Footer,
    MySwiper
  }
};
</script>

<style scoped lang="less">
.header {
  .top {
    display: flex;
    height: 88px;
    background: #6a7531;
    overflow: hidden;
    color: #fff;
    .add {
      width: 15%;
      text-align: center;
      line-height: 88px;
      font-size: 36px;
    }
    .search {
      width: 55%;
      height: 56px;
      margin-top: 16px;
      border-radius: 18px;
      background: #ffffff;
      i {
        width: 43px;
        height: 43px;
        font-size: 43px;
        float: left;
        line-height: 56px;
        margin-left: 12px;
        color: #666666;
      }
      input {
        float: left;
        border: 0;
        line-height: 40px;
        height: 40px;
        width: 70%;
        padding-left: 7px;
        margin-top: 6.5px;
        margin-bottom: 6.5px;
        outline: none;
        color: #333333;
      }
    }
    .scan {
      width: 15%;
      font-size: 18px;
      text-align: center;
      i {
        display: block;
        width: 34px;
        height: 35px;
        background: url(../image/home_scan.png) no-repeat;
        background-size: 34px 35px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 15px;
        margin-bottom: 4px;
      }
    }
    .info {
      width: 15%;
      font-size: 18px;
      text-align: center;
      i {
        display: block;
        width: 34px;
        height: 35px;
        background: url(../image/home_info.png) no-repeat;
        background-size: 34px 35px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 15px;
        margin-bottom: 4px;
      }
    }
  }
  .banner {
    position: relative;
    height: 265px;
    .bannerList {
      position: relative;
      li {
        position: absolute;
        img {
          width: 100%;
        }
      }
    }
    .dotList {
      position: absolute;
      bottom: 20px;
      left: 50%;
      margin-left: -42px;
      li {
        width: 20px;
        height: 20px;
        background: #6a7531;
        float: left;
        border-radius: 50%;
        margin-right: 7px;
      }
      .currentDot {
        background: #1f1e25;
      }
    }
  }
  .nav {
    overflow: hidden;
    margin: 0 auto;
    margin-top: 33px;
    width: 730px;
    font-size: 24px;
    color: #1e1d25;
    display: flex;
    flex-wrap: wrap;
    li {
      width: 25%;
      text-align: center;
      margin-bottom: 22px;
      a {
        color: #333333;
        img {
          width: 102px;
          height: 102px;
          margin-bottom: 5px;
        }
      }
    }
  }
}
.main {
  margin-bottom: 99px;
  .brand {
    border-top: 1px solid #6a7531;
    border-bottom: 1px solid #6a7531;
    margin: 15px 0 35px 0;
    padding: 26px 0 19px 19px;
    color: #6a7531;
    font-size: 24px;
    div {
      height: 30px;
      line-height: 30px;
      overflow: hidden;
      margin-bottom: 7px;
    }
    h4 {
      height: 30px;
      line-height: 30px;
      font-size: 30px;
      float: left;
    }
    i {
      color: #ff681d;
      display: block;
      height: 30px;
      line-height: 30px;
      width: 73px;
      text-align: center;
      border-radius: 5px;
      float: left;
      margin-left: 12px;
      margin-right: 24px;
    }
    b {
      float: left;
      width: 70%;
      height: 30px;
      line-height: 30px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .section {
    position: relative;
    margin-top: 40px;
    span {
      display: block;
      width: 19px;
      height: 34px;
      background: url(../image/home_more.png) no-repeat;
      background-size: 19px 34px;
      position: absolute;
      top: 20px;
      right: 23px;
    }
    .cheng {
      border: 1px solid #dfdfdf;
      overflow: hidden;
      display: flex;
      flex-wrap: wrap;
      li {
        width: 50%;
        img {
          display: block;
          width: 100%;
          height: 100%;
          box-sizing: border-box;
          border: 1px solid #dfdfdf;
        }
      }
    }
    ul {
      border: 1px solid #dfdfdf;
      overflow: hidden;
      display: flex;
      flex-wrap: wrap;
      li {
        width: 50%;
        img {
          display: block;
          width: 100%;
          height: 100%;
          box-sizing: border-box;
          border: 1px solid #dfdfdf;
        }
      }
    }
    h3 {
      width: 192px;
      height: 56px;
      line-height: 56px;
      font-size: 36px;
      text-align: center;
      color: #fff;
      background: #fe3a0a;
      border-bottom-right-radius: 12px;
      border-top-right-radius: 12px;
      position: absolute;
      left: 15px;
      top: 0;
    }
    h4 {
      background: #ffc40e;
      width: 192px;
      height: 56px;
      line-height: 56px;
      font-size: 36px;
      text-align: center;
      color: #fff;
      border-bottom-right-radius: 12px;
      border-top-right-radius: 12px;
      position: absolute;
      left: 15px;
      top: 0;
    }
  }
}
.footer {
  margin-top: 43px;
  border-top: 1px solid #eeeeee;
  ul {
    li {
      float: left;
      width: 20%;
      text-align: center;
      margin-top: 11px;
      position: relative;
      img {
        width: 44px;
        height: 44px;
        margin-bottom: 5px;
      }
      span {
        position: absolute;
        right: 40px;
        top: -13px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        color: #fff;
        background: #6a7531;
        font-size: 14px;
        text-align: center;
      }
    }
    .on {
      color: #6a7531;
    }
  }
}
</style>